#ifndef _WINDSOUL_CPackage_H_
#define _WINDSOUL_CPackage_H_

#include <string>
#include "Type.h"

struct ChildFileIndex;
// namespace ArkCommon
// {
// 
// 	namespace Package
// 	{
		class CPackage
		{
		public:
            bool Load(const char *name);
			const char *Open(const char *name,int *pos,int *length) const;
			~CPackage();
			CPackage();

			int LoadHeader(const char *name);

            //
            bool SearchFile( uint32 nID, ChildFileIndex* pFileIdx);

            //
            bool GetFileData(uint32 fileOffset,uint32 size, void* pointer);
		private:

			std::string _filename;
			int m_iFileCount;
            ChildFileIndex *m_pFileIndex;

            //data member add by liuxinglong 2011-5-10
            CPkgFile m_pkgFile;

		};


#endif
